package com.example.demo.dao;

import com.example.demo.entities.Comment;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CommentRepository extends JpaRepository<Comment,Long> {

    //把父级评论找出来即可
    //是父级评论是空的
    List<Comment> findByNewsIdAndParentCommentNull(Long newId, Sort sort);
}
